﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;

namespace HomeWork
{
    public class Student : Entity<int>
    {
        public int Lessons = 0;
        private Teacher teacher = new Teacher();

        public double Score { get; private set; }  /*= 98.5;*/
        private string Name = "张三";

        public Student() { }
        public Student(int score)
        {
            Score = score;  
        }

        public double Learn()
        {
            
            return Score += 10;
        }

        public void Attend()
        {
            Lessons++;
            teacher.points++;
            Console.WriteLine("学生参加了" + Lessons + "节课");
            Console.WriteLine("老师的积分是" + teacher.points);
        }

       
    }
}
